home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / hypercar / xfcn / spttool.cpt / Support Tools eXternals 1.2.5 / card_13890.txt < prev    next >
Text File  |  1990-11-13  |  12KB  |  381 lines

  1. -- card: 13890 from stack: in.5
  2. -- bmap block id: 14927
  3. -- flags: 0000
  4. -- background id: 14562
  5. -- name: Report Bugs
  6. ----- HyperTalk script -----
  7. on OpenCard
  8.   -- try to avoid empty messages being sent and people losing comments
  9.   --  by going to another card before sending
  10.   global STFEEDBACKLENGTH
  11.   put length(cd fld "link text") + length(cd fld "system report") into STFEEDBACKLENGTH
  12. end OpenCard
  13.  
  14. on DoMenu whichMenu
  15.   -- see if the requested menu action will leave this card
  16.   if whichMenu is in "Quit HyperCard,Open Stack...,New Stack..." && "Home,Back,Recent,Help,First,Next,Prev,Last" then
  17.     if not OKToLeave() then exit DoMenu
  18.   end if
  19.   pass DoMenu
  20. end DoMenu
  21.  
  22. function OKToLeave
  23. -- try to avoid empty messages being sent and people losing comments
  24. --  by going to another card before sending when the stack is locked
  25. global STFEEDBACKLENGTH
  26. put length(cd fld "link text") + length(cd fld "system report") into currLength
  27. if currLength Γëá STFEEDBACKLENGTH and the cantmodify of this stack then
  28.   -- something has changed since entering the card, and the stack is
  29.   --  locked.  make sure they mean to lose their comments
  30.   answer "Leaving the card now will loose your valuable comments." && " Leave this card anyway?" with "Yes" or "No"
  31.   if it = "No" then return false  -- don't leave yet
  32. end if
  33. return true     -- OK to leave
  34. end OKToLeave
  35.  
  36.  
  37. -- part 8 (button)
  38. -- low flags: 00
  39. -- high flags: A001
  40. -- rect: left=225 top=293 right=339 bottom=288
  41. -- title width / last selected line: 0
  42. -- icon id / first selected line: 1099 / 1099
  43. -- text alignment: 1
  44. -- font id: 3
  45. -- text size: 18
  46. -- style flags: 0
  47. -- line height: 24
  48. -- part name: AppleLink
  49. ----- HyperTalk script -----
  50. on mouseUp
  51.   -- 9:44 AM 11/12/90 ec
  52.   --
  53.   global STFEEDBACKLENGTH
  54.   -- has a system report been generated?
  55.   -- how about a typed message?
  56.   put length(cd fld "link text") + length(cd fld "system report") into currLength
  57.   if currLength = STFEEDBACKLENGTH then
  58.     answer "Don't you want to add any comments?" with "No" or "Oh, yeahΓǪ"
  59.     if it =  "Oh, yeahΓǪ" then exit mouseUp
  60.   end if
  61.  
  62.   answer "What version of AppleLink will you be using?" with "Cancel" or "4.0" or "5.0"
  63.   if it is "Cancel" then
  64.     exit mouseUp
  65.   end if
  66.   put it into modeOfTransport
  67.  
  68.   -- build up the text to print
  69.   put cd fld "link text" & return into snoopInfo
  70.   repeat 50 times
  71.     put "ΓÇö" after snoopInfo
  72.   end repeat
  73.   put return & cd fld "system report" after snoopInfo
  74.  
  75.   if modeOfTransport = "4.0" then
  76.     MakeSendMe4 "cyNic","","System configuration",snoopInfo
  77.   else if modeOfTransport = "5.0" then
  78.     MakeSendMe5 "cyNic","","System configuration",snoopInfo
  79.   end if
  80.  
  81.   answer "A file has been put into your AppleLink outbasket folder" && "(in your system folder).  It will appear in your outbasket when" && " you next log onto AppleLink.  Please sent it then."
  82. end mouseUp
  83.  
  84.  
  85.  
  86. -- part 15 (button)
  87. -- low flags: 00
  88. -- high flags: A001
  89. -- rect: left=69 top=293 right=339 bottom=149
  90. -- title width / last selected line: 0
  91. -- icon id / first selected line: 1128 / 1128
  92. -- text alignment: 1
  93. -- font id: 0
  94. -- text size: 12
  95. -- style flags: 0
  96. -- line height: 16
  97. -- part name: Generate Report
  98. ----- HyperTalk script -----
  99. on mouseUp
  100.   global xErr
  101.   set cursor to busy
  102.   if the visible of cd fld "HELP!" then send "mouseUp" to cd btn "HELP!"
  103.   put "Reading system parametersΓǪ"
  104.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó Configuration: " & return & SysEnvironment() & return & return into sysStr
  105.  
  106.   DegubStr "SysEnvironment" & return & sysStr
  107.  
  108.   put sysStr into cd fld "system report"
  109.  
  110.   put "Reading Applications runningΓǪ"
  111.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó Applications running:" & return after cd fld "system report"
  112.   if MFIsRunning() then
  113.     put ApplicationList() & return & return into sysStr
  114.  
  115.     DegubStr "ApplicationList" & return & sysStr
  116.  
  117.     put sysStr after cd fld "system report"
  118.   else
  119.     put "HyperCard" & return & return after cd fld "system report"
  120.   end if
  121.  
  122.   put "Reading Open FilesΓǪ"
  123.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó Open Files:" & return after cd fld "system report"
  124.   put VolumeList() into theVolumes
  125.   repeat with volNdx = 1 to the number of lines in theVolumes
  126.     set cursor to busy
  127.     put line volNdx of theVolumes into aVol
  128.     if aVol Γëá empty then
  129.       put OpenFiles(aVol) & return into sysStr
  130.  
  131.       DegubStr "OpenFiles" & return & sysStr
  132.  
  133.       put sysStr after cd fld "system report"
  134.     end if
  135.   end repeat
  136.  
  137.   put "Reading MultiFinder Version Number"
  138.   -- Find the path to multifinder from the open files list
  139.   put lineOffset(":MultiFinder",cd fld "system report") into mfLineNum
  140.   if mfLineNum Γëá 0 then  -- multifinder in the listing
  141.     put line mfLineNum of cd fld "system report" into mfPath
  142.     put FileVersion(mfPath,"nodialog:errMsg") into mfVersion
  143.     if mfVersion Γëá empty then
  144.       put return & "ΓÇóΓÇóΓÇóΓÇóΓÇó MultiFinder version:" & return after cd fld "system report"
  145.  
  146.       DegubStr "FileVersion" & return & mfVersion
  147.  
  148.       put mfVersion & return & return after cd fld "system report"
  149.     end if
  150.   end if
  151.  
  152.   put "Reading memoryΓǪ"
  153.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó RAM = " & TotalRam()/1024 & "K" & return & return after cd fld "system report"
  154.  
  155.   put "Reading SCSI InfoΓǪ"
  156.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó SCSI Info:" & return after cd fld "system report"
  157.   repeat with SCSINdx = 0 to 6
  158.     set cursor to busy
  159.     put SCSIinfo(SCSINdx,"noDialog:xErr") into SCSIdata
  160.     if SCSIdata <> empty then
  161.       put "ΓÇó" & SCSINdx & "ΓÇó" & return & SCSIdata & return & return into SCSIdata
  162.  
  163.       DegubStr "SCSI" & return & SCSIdata
  164.  
  165.       put SCSIdata after cd fld "system report"
  166.     end if
  167.     put empty into xErr
  168.   end repeat
  169.   put return after cd fld "system report"
  170.  
  171.   put "Reading Monitor Info:"
  172.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó Monitor Info:" & return after cd fld "system report"
  173.   repeat with MonitorNdx = 1 to MonitorCount()
  174.     set cursor to busy
  175.     put monitorConfig(MonitorNdx) into MonitorInfo
  176.     if MonitorInfo <> empty then
  177.  
  178.       DegubStr "MonitorInfo" & return & MonitorInfo
  179.  
  180.       put MonitorInfo after cd fld "system report"
  181.     end if
  182.   end repeat
  183.  
  184.   set cursor to busy
  185.   put "Reading INIT Info:"
  186.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó INIT Info:" & return after cd fld "system report"
  187.   put INITList("detailed") & return & return after cd fld "system report"
  188.  
  189.   set cursor to busy
  190.   put "Reading Heapspace:"
  191.   put "ΓÇóΓÇóΓÇóΓÇóΓÇó Heapspace:" & the heapspace & return after cd fld "system report"
  192.  
  193.   Put empty
  194.   hide msg
  195.  
  196. end mouseUp
  197.  
  198. function lineOffset searchString,anyString
  199. return number of lines of char 1 to offset(searchString,anyString) of anyString
  200. end lineOffset
  201.  
  202. on DegubStr theText
  203.   -- allows one to see the contents of a variable during script exection
  204.   exit DegubStr  -- disable for now
  205.   set the script of cd btn "temp" to theText
  206.   edit the script of cd btn "temp"
  207. end DegubStr
  208.  
  209.  
  210.  
  211.  
  212. -- part 7 (button)
  213. -- low flags: 00
  214. -- high flags: A001
  215. -- rect: left=366 top=293 right=339 bottom=430
  216. -- title width / last selected line: 0
  217. -- icon id / first selected line: 302 / 302
  218. -- text alignment: 1
  219. -- font id: 3
  220. -- text size: 18
  221. -- style flags: 0
  222. -- line height: 24
  223. -- part name: Print
  224. ----- HyperTalk script -----
  225. on mouseUp
  226.   --
  227.   --  print the system report and message
  228.   --
  229.   global xErr, STFEEDBACKLENGTH
  230.   -- has a system report been generated?
  231.   -- how about a typed message?
  232.   put length(cd fld "link text") + length(cd fld "system report") into currLength
  233.   if currLength = STFEEDBACKLENGTH then
  234.     answer "Don't you want to add any comments?" with "No" or "Oh, yeahΓǪ"
  235.     if it =  "Oh, yeahΓǪ" then exit mouseUp
  236.   end if
  237.  
  238.   --
  239.   -- build up the text to print
  240.   put cd fld "link text" & return into snoopInfo
  241.   repeat 50 times
  242.     put "ΓÇö" after snoopInfo
  243.   end repeat
  244.   put return & cd fld "system report" after snoopInfo
  245.  
  246.   answer "Are you going to mail this report to us?" with "Cancel" or "Yes" or "No"
  247.  
  248.   if it = "Cancel" then
  249.     exit mouseUp
  250.   else if it = "Yes" then
  251.     put "Please send to:" & return & return & "Eric Carlson" & return & "Support Tools Development" & return & "Apple Computer Inc." & return & "Mail Stop: 72L" & return & "900 E. Hamilton Ave." & return & "Campbell, Ca. 95008" & return & return & return & return before snoopInfo
  252.   end if
  253.  
  254.   put "your system configuration" into printPrompt
  255.  
  256.   PrintContainer snoopInfo,printPrompt,"pagesetup","printjob",times,10, "plain", "noDialog:xErr"
  257.  
  258. end mouseUp
  259.  
  260.  
  261.  
  262. -- part 9 (field)
  263. -- low flags: 00
  264. -- high flags: 0007
  265. -- rect: left=15 top=190 right=290 bottom=501
  266. -- title width / last selected line: 0
  267. -- icon id / first selected line: 0 / 0
  268. -- text alignment: 0
  269. -- font id: 3
  270. -- text size: 12
  271. -- style flags: 0
  272. -- line height: 16
  273. -- part name: system report
  274. ----- HyperTalk script -----
  275. on openField
  276.   put random(10) into factor
  277.   if factor < 5 then
  278.     beep
  279.     answer "You wouldn't be changing anything in here" & return & "in order to lie to us, would you?!" with "No, I promise"
  280.   end if
  281.   pass openField
  282. end openField
  283.  
  284.  
  285.  
  286. -- part 10 (field)
  287. -- low flags: 00
  288. -- high flags: 0007
  289. -- rect: left=15 top=93 right=187 bottom=501
  290. -- title width / last selected line: 0
  291. -- icon id / first selected line: 0 / 0
  292. -- text alignment: 0
  293. -- font id: 3
  294. -- text size: 12
  295. -- style flags: 0
  296. -- line height: 16
  297. -- part name: link text
  298.  
  299.  
  300. -- part 13 (button)
  301. -- low flags: 00
  302. -- high flags: 0001
  303. -- rect: left=129 top=54 right=85 bottom=163
  304. -- title width / last selected line: 0
  305. -- icon id / first selected line: 27104 / 27104
  306. -- text alignment: 1
  307. -- font id: 0
  308. -- text size: 12
  309. -- style flags: 0
  310. -- line height: 16
  311. -- part name: HELP!
  312. ----- HyperTalk script -----
  313. on mouseUp
  314.   set the hilite of me to not the hilite of me
  315.   set the visible of cd fld "HELP!" to not the visible of cd fld "HELP!"
  316. end mouseUp
  317.  
  318.  
  319.  
  320. -- part 14 (field)
  321. -- low flags: 81
  322. -- high flags: 2007
  323. -- rect: left=15 top=93 right=290 bottom=501
  324. -- title width / last selected line: 0
  325. -- icon id / first selected line: 0 / 0
  326. -- text alignment: 0
  327. -- font id: 3
  328. -- text size: 12
  329. -- style flags: 0
  330. -- line height: 16
  331. -- part name: HELP!
  332. ----- HyperTalk script -----
  333. on mouseUp
  334.   if the visible of me then
  335.     set the hilite of cd btn "HELP!" to not the visible of cd btn "HELP!"
  336.     hide me
  337.   end if
  338. end mouseUp
  339.  
  340.  
  341. -- part 16 (button)
  342. -- low flags: 80
  343. -- high flags: 8004
  344. -- rect: left=333 top=0 right=56 bottom=448
  345. -- title width / last selected line: 0
  346. -- icon id / first selected line: 0 / 0
  347. -- text alignment: 1
  348. -- font id: 0
  349. -- text size: 12
  350. -- style flags: 0
  351. -- line height: 16
  352. -- part name: Temp
  353. ----- HyperTalk script -----
  354. MonitorInfo
  355. 0,0,640,480
  356. 640 x 480
  357. Slot 2
  358. 256 Colors
  359. Active
  360. Has menu bar
  361.  
  362.  
  363.  
  364.  
  365. -- part contents for card part 10
  366. ----- text -----
  367. Type the message you wish sent to us into this field and click the 
  368. ΓÇ£Generate ReportΓÇ¥ button to fill in the field below.
  369. Press the ΓÇ£AppleLinkΓÇ¥ button below to send these two fields via AppleLink, or press the ΓÇ£PrintΓÇ¥ button to print the text and mail it.
  370.  
  371. -- part contents for card part 14
  372. ----- text -----
  373. This card is our attempt at getting bug reports and feedback from you.  Use it to send us notes, comments, bug reports, gripes, requests, or anything else you can come up with.
  374.  
  375. First, click on the Generate Report button.  This button makes use of many of the externals found in this stack.  It generates a detailed description of your system and places it into the lower field.  You can send it to us along with a note or just look over it for your own information.
  376.  
  377. Next, fill in the upper field with whatever you want.  It will be sent along with your System Report.
  378.  
  379. Finally, click on the AppleLink button below to send your message and system report to us.  You will be asked what version of AppleLink you are using and then a link will be saved into your AppleLink Out basket.  The next time you log onto AppleLink, you can send the message.  It will automatically be addressed to us.
  380.  
  381. Click on the Print button below to print a copy of the system report and your message.  The button uses our PrintContainer XCMD.  The text of the report will be printed to the currently chosen printer with our address printed at the top of the page.